package main.war.city.building;

import java.util.Iterator;
import java.util.TreeMap;

import org.bukkit.inventory.ItemStack;

public class Blocks {
	private TreeMap<Loc,ItemStack> map = new TreeMap<>();
	private final Building building;
	public Blocks(Building building){
		this.building=building;
	}
	public Building getBuilding(){
		return building;
	}
	public ItemStack getItem(int x,int y,int z){
		return getItem(new Loc(x,y,z));
	}
	public ItemStack getItem(Loc l){
		return map.get(l);
	}
	public void addItem(Loc l,ItemStack item){
		map.put(l, item);
	}
	public void clear(){
		map.clear();
	}
	public Iterator<Loc> getKeys(){
		return map.keySet().iterator();
	}
}
